package week3;//****************************************************************************************************************************
// Teleponenumber.java          Author:Duanzhixuan
//  生成一个10位的随机的电话号码。
//****************************************************************************************************************************
   
   public class pp3_3
   {
    public static void main(String[] args)
    {
    int a =(int) (Math.random()*8); 
    int b =(int) (Math.random()*8);
    int c =(int) (Math.random()*8);
    int d =(int) (Math.random()*7);
    int e =(int) (Math.random()*10);
    int f =(int) (Math.random()*10);
    int j =(int) (Math.random()*10);
{
    if(d == 6)
    e = (int) (Math.random()*6);
}
if(d == 6 && e == 5)
{  
   f = (int) (Math.random() *6);
}
   int k=(int) (Math.random()*10);
   int l=(int) (Math.random()*10);
   int m=(int) (Math.random()*10);
   
   System.out.println("生成的电话号码:"+a+b+c+"-"+d+e+f+"-"+j+k+l+m);
     }
}
